#ifndef XSLIDER_H
#define XSLIDER_H

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

#include <XWidget.h>

class XEXPORT_DLL XSlider : public XWidget
{
private:
	int MaxValue;
	int Value;
	bool Vertical;
	bool Slided;

	XVector SliderTranslation;
	XRenderPack* Slider;

	void _loadVertices();
	void _loadTextureVertices();

	void _loadSlider();
public:
	XSlider(XHash hash, XWindow* parentWindow);

	void SetVertical();
	void SetHorizontal();
	int GetValue();
	void SetGeometry(XRectangle rect);
	void SetValue(int value);
	void SetMaxValue(int value);

	void SetDisable();
	void SetEnable();

	void Update(XInputModule* input);

};

#endif